package plantshop.controller.moves;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;


public class MoveQueueIterator implements Iterator<Move>, Serializable{
	private static final long serialVersionUID = 342564432800461103L;
	Map<Integer, Move> moves;
	private int index, end;
	
	public MoveQueueIterator(Map<Integer, Move> moves, int start, int end){
		this.moves = moves;
		index = start;
		this.end = end;
	}
	
	@Override
	public boolean hasNext() {
		return index < end;
	}

	@Override
	public Move next() {
		return moves.get(index++);
	}

	@Override
	public void remove() {
		throw new UnsupportedOperationException();
	}

}
